load("@fbcode_macros//build_defs:rust_library.bzl", "rust_library")
load("@fbsource//tools/build_defs:glob_defs.bzl", "glob")

oncall("buck2")

rust_library(
    name = "buck2_util",
    srcs = glob(
        ["src/**/*.rs"],
    ),
    os_deps = [
        (
            "windows",
            [
                "fbsource//third-party/rust:winapi",
            ],
        ),
    ],
    test_deps = [
        "fbsource//third-party/rust:serde_json",
    ],
    deps = [
        "fbsource//third-party/rust:anyhow",
        "fbsource//third-party/rust:futures",
        "fbsource//third-party/rust:libc",
        "fbsource//third-party/rust:once_cell",
        "fbsource//third-party/rust:serde",
        "fbsource//third-party/rust:static_assertions",
        "fbsource//third-party/rust:tokio",
        "fbsource//third-party/rust:tracing",
        "fbsource//third-party/rust:triomphe",
        "//buck2/allocative/allocative:allocative",
        "//buck2/gazebo/dupe:dupe",
        "//buck2/starlark-rust/starlark_map:starlark_map",
    ],
)
